<template>
    <div class="btn">
        <i class="iconfont icon" v-if="iconName" :class="[iconName]"></i>
        <span>
            <slot></slot>
        </span>
    </div>
</template>

<script setup>
defineProps({
    iconName: {
        type: String,
        default: ""
    }
});
</script>

<style lang="less" scoped>
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin-left: 16px;
    width: 80px;
    height: 32px;
    font-size: 14px;
    border: 1px solid @main-color;
    color: @main-color;
    text-align: center;
    cursor: pointer;
    .icon {
        margin-right: 5px;
    }
}
</style>
